package org.seed.example.demoprovider;

import com.google.gson.Gson;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Component
public class TeacherServiceImpl implements TeacherService {

    @Override
    public List<String> getMyClasses() {
        List<String> rst = new ArrayList<>();
        rst.add("不二");
        rst.add("灵性");
        return rst;
    }

    @Override
    public Object timeout() {
        try {
            Thread.sleep(10000l);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return new Gson();
    }

    @Override
    public Map<String, String> pushDeliveryInfo(List<RawTradeDeliverPushRequest> deliverPushRequestList) {
        System.out.println(new Gson().toJson(deliverPushRequestList));
        return new HashMap<>();
    }
}
